import VueRouter from 'vue-router'

import Home from './components/tabbar/HomeContainer.vue'
import Member from './components/tabbar/MemberContainer.vue'
import Search from './components/tabbar/SearchContainer.vue'
import Shopcar from './components/tabbar/ShopcarContainer.vue'
import NewsList from './components/news/newsList.vue'
import NewInfo from './components/news/newInfo.vue'
import PhotoList from './components/photos/PhotoList.vue'
import PhotoInfo from './components/photos/PhotoInfo.vue'
import GoodsList from './components/goods/GoodsList.vue'
import GoodInfo from './components/goods/GoodInfo.vue'
import GoodDesc from './components/goods/GoodDesc.vue'
import GoodCom from './components/goods/GoodComment.vue'

var router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home'},
        { path: '/home', component: Home },
        { path: '/member', component: Member },
        { path: '/search', component: Search },
        { path: '/shopcar', component: Shopcar },
        { path: '/home/newslist', component: NewsList},
        { path: '/home/newslist/:id', component: NewInfo},
        { path: '/home/photolist', component: PhotoList},
        { path: '/home/photoinfo/:id', component: PhotoInfo},
        { path: '/home/goodslist', component: GoodsList},
        { path: '/home/goodinfo/:id', component: GoodInfo},
        { path: '/home/gooddesc/:id', component: GoodDesc, name: 'goodDesc'},
        { path: '/home/goodcom/:id', component: GoodCom, name: 'goodCom'}

    ],
    linkActiveClass: 'mui-active'
})

export default router